<template>
  <page-search
    :searchFormConfig="searchFormConfig"
    @resetBtnClick="handleResetClick"
    @queryBtnClick="handleQueryClick"
  ></page-search>
  <page-content
    pageName="task"
    ref="pageContentRef"
    :contentTableConfig="contentTableConfig"
  ></page-content>
</template>
<script lang="ts" setup>
import { ref, onMounted } from "vue";
import PageSearch from "@/components/Form/PageSearch.vue";
import PageContent from "./components/PageContent.vue";
import { searchFormConfig, contentTableConfig } from "./config.ts";

const pageContentRef = ref<any>();

const handleResetClick = () => {
  pageContentRef.value?.getPageData();
};
const handleQueryClick = (formData: any) => {
  pageContentRef.value?.getPageData(formData);
};

onMounted(() => {
  pageContentRef.value?.getPageData();
});
</script>
